﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VirtualPress.Infrastructure.Entities.Repository;
using VirtualPress.Infrastructure.Entities.Entity;
using VirtualPress.Tool.Configration;
using VirtualPress.Infrastructure.Entities.Enum;

namespace VirtualPress.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                new T_User()
                {
                    Area = 1,
                    Birthday = DateTime.Parse("1986-09-04"),
                    Email = "huiyuan@163.com",
                    Gender = true,
                    IsActivate = true,
                    IsRefuse = false,
                    Location = 1,
                    NickName = "普通会员",
                    Password = "KcTnhhtvvuH9jMLyE1j+Uw==",
                    Phone = "15923598280",
                    Photo = "/content/img/100/07.png",
                    Profession = 1,
                    QQ = "51944179",
                    RcdDate = DateTime.Now,
                    UserName = "51944179@qq.com",
                    SystemRole = (int)UserRole.Member //普通会员
                }.PostAdd();

                new T_User()
                {
                    Area = 1,
                    Birthday = DateTime.Parse("1986-09-04"),
                    Email = "zhuanjia@163.com",
                    Gender = true,
                    IsActivate = true,
                    IsRefuse = false,
                    Location = 1,
                    NickName = "专家",
                    Password = "KcTnhhtvvuH9jMLyE1j+Uw==",
                    Phone = "15923598280",
                    Photo = "/content/img/100/07.png",
                    Profession = 1,
                    QQ = "51944179",
                    RcdDate = DateTime.Now,
                    UserName = "zhuanjia@163.com",
                    SystemRole = (int)UserRole.Expert //审稿专家
                }.PostAdd();

                new T_User()
                {
                    Area = 1,
                    Birthday = DateTime.Parse("1986-09-04"),
                    Email = "634691728@qq.com",
                    Gender = true,
                    IsActivate = true,
                    IsRefuse = false,
                    Location = 1,
                    NickName = "专家B",
                    Password = "KcTnhhtvvuH9jMLyE1j+Uw==",
                    Phone = "15923598280",
                    Photo = "/content/img/100/07.png",
                    Profession = 1,
                    QQ = "51944179",
                    RcdDate = DateTime.Now,
                    UserName = "634691728@qq.com",
                    SystemRole = (int)UserRole.Expert //审稿专家
                }.PostAdd();

                new T_User()
                {
                    Area = 1,
                    Birthday = DateTime.Parse("1986-09-04"),
                    Email = "rogers1754@sina.com",
                    Gender = true,
                    IsActivate = true,
                    IsRefuse = false,
                    Location = 1,
                    NickName = "编委会专家A",
                    Password = "KcTnhhtvvuH9jMLyE1j+Uw==",
                    Phone = "15923598280",
                    Photo = "/content/img/100/07.png",
                    Profession = 1,
                    QQ = "51944179",
                    RcdDate = DateTime.Now,
                    UserName = "rogers1754@sina.com",
                    SystemRole = (int)UserRole.Expert //审稿专家
                }.PostAdd();

                new T_User()
                {
                    Area = 1,
                    Birthday = DateTime.Parse("1986-09-04"),
                    Email = "bianweihuiB@163.com",
                    Gender = true,
                    IsActivate = true,
                    IsRefuse = false,
                    Location = 1,
                    NickName = "编委会专家B",
                    Password = "KcTnhhtvvuH9jMLyE1j+Uw==",
                    Phone = "15923598280",
                    Photo = "/content/img/100/07.png",
                    Profession = 1,
                    QQ = "51944179",
                    RcdDate = DateTime.Now,
                    UserName = "bianweihuiB@163.com",
                    SystemRole = (int)UserRole.Expert //审稿专家
                }.PostAdd();

                new T_User()
                {
                    Area = 1,
                    Birthday = DateTime.Parse("1986-09-04"),
                    Email = "qikan@163.com",
                    Gender = true,
                    IsActivate = true,
                    IsRefuse = false,
                    Location = 1,
                    NickName = "期刊管理员",
                    Password = "KcTnhhtvvuH9jMLyE1j+Uw==",
                    Phone = "15923598280",
                    Photo = "/content/img/100/07.png",
                    Profession = 1,
                    QQ = "51944179",
                    RcdDate = DateTime.Now,
                    UserName = "qikan@163.com",
                    SystemRole = (int)UserRole.JounalsAdmin //期刊管理员
                }.PostAdd();

                new T_User()
                {
                    Area = 1,
                    Birthday = DateTime.Parse("1986-09-04"),
                    Email = "zazhi@163.com",
                    Gender = true,
                    IsActivate = true,
                    IsRefuse = false,
                    Location = 1,
                    NickName = "杂志管理员",
                    Password = "KcTnhhtvvuH9jMLyE1j+Uw==",
                    Phone = "15923598280",
                    Photo = "/content/img/100/07.png",
                    Profession = 1,
                    QQ = "51944179",
                    RcdDate = DateTime.Now,
                    UserName = "zazhi@163.com",
                    SystemRole = (int)UserRole.MagazineAdmin //杂志管理员
                }.PostAdd();

                new T_User()
                {
                    Area = 1,
                    Birthday = DateTime.Parse("1986-09-04"),
                    Email = "admin@163.com",
                    Gender = true,
                    IsActivate = true,
                    IsRefuse = false,
                    Location = 1,
                    NickName = "郭果果",
                    Password = "KcTnhhtvvuH9jMLyE1j+Uw==",
                    Phone = "15923598280",
                    Photo = "/content/img/100/07.png",
                    Profession = 1,
                    QQ = "51944179",
                    RcdDate = DateTime.Now,
                    UserName = "admin@163.com",
                    SystemRole = (int)UserRole.Admin //系统管理员
                }.PostAdd();

                var magezine = new T_Periodical()
                {
                    Type = (int)JournalType.nonscholastic,
                    Admin = "zazhi@163.com",
                    IndType = 9999,
                    CoverImg = "/content/journal/manuscripts/cover/sadasdsad047c3945-fd1b-42fa-99d0-cfb841041976.jpg",
                    Editor = "杂志主编",
                    Email = "51944179@qq.com",
                    FoundTime = DateTime.Now,
                    Introduction = "asfdasfasfasfasf",
                    IsActive = true,
                    ISSN_Online = "11111111111",
                    ISSN_Print = "22222222222",
                    Name = "这是一个非学术性杂志",
                    Name_EN = "asdasdasdasd",
                    ShortName = "shortname",
                    RegTime = DateTime.Now,
                    PubRate = (int)PubRate.Month,
                    ZGFW = "社会科学",
                    Retrieval = "asdasdasdasd",
                    ZBDW = "asdasdasdasd",
                    CallForPaper = "asdasdasdasdasdasd",
                    DownloadNumber = 10,
                    VisitNumber = 1,
                    DefaultExamineDay = 30,
                    ManuscriptTemplete = SiteResource.DefaultManuscritpsTemplete,
                    ManuscriptPageSize = SiteResource.DefaultPageSize,
                    ExamineSheet = SiteResource.DefaultExamineSheet,
                    PagePrice = SiteResource.DefaultPagePrice,
                    PricePerPrice = SiteResource.DefaultPricePerPage,
                    PublicationPrice = SiteResource.DefaultPublicationPrice
                };
                magezine.PostAdd();

                var journal = new T_Periodical()
                {
                    Type = (int)JournalType.technicality,
                    Admin = "qikan@163.com",
                    IndType = 0,
                    CoverImg = "/content/journal/manuscripts/cover/sadasdsad047c3945-fd1b-42fa-99d0-cfb841041976.jpg",
                    Editor = "主编甲",
                    Email = "51944179@qq.com",
                    FoundTime = DateTime.Now,
                    Introduction = "asfdasfasfasfasf",
                    IsActive = true,
                    ISSN_Online = "11111111111",
                    ISSN_Print = "22222222222",
                    Name = "期刊杂志啥子事",
                    Name_EN = "asdasdasdasd",
                    ShortName = "shortname",
                    RegTime = DateTime.Now,
                    PubRate = (int)PubRate.Month,
                    ZGFW = "生物物理与医学物理;复杂系统物理学;计算物理;凝聚态物理;宇宙学和早期宇宙;纳米结构物理;等离子体物理;量子理论;相对论天体物理;理论高能物理",
                    Retrieval = "asdasdasdasd",
                    ZBDW = "asdasdasdasd",
                    CallForPaper = "asdasdasdasdasdasd",
                    DownloadNumber = 10,
                    VisitNumber = 1,
                    DefaultExamineDay = 30,
                    ManuscriptTemplete = SiteResource.DefaultManuscritpsTemplete,
                    ManuscriptPageSize = SiteResource.DefaultPageSize,
                    ExamineSheet = SiteResource.DefaultExamineSheet,
                    PagePrice = SiteResource.DefaultPagePrice,
                    PricePerPrice = SiteResource.DefaultPricePerPage,
                    PublicationPrice = SiteResource.DefaultPublicationPrice
                };
                journal.PostAdd();

                new T_Organization()
                {
                    ApplyStatus = 1,
                    JoinDate = DateTime.Now,
                    OrgId = journal.Id,
                    OrgType = (int)OrganizationType.Journal,
                    Status = 2,
                    UserName = "rogers1754@sina.com"
                }.PostAdd();

                new T_Organization()
                {
                    ApplyStatus = 1,
                    JoinDate = DateTime.Now,
                    OrgId = journal.Id,
                    OrgType = (int)OrganizationType.Journal,
                    Status = 2,
                    UserName = "bianweihuiB@163.com"
                }.PostAdd();

                new T_Expert()
                {
                    Address = "地址",
                    Country = "",
                    Degree = "博士",
                    Fax = "",
                    Institution = "单位",
                    Introduction = "简介",
                    Isvalid = true,
                    Postcode = "",
                    Profession = (int)Profession.ShuXueYuWuLi,
                    UserName = "rogers1754@sina.com"
                }.PostAdd();

                new T_Expert()
                {
                    Address = "地址",
                    Country = "",
                    Degree = "博士",
                    Fax = "",
                    Institution = "单位",
                    Introduction = "简介",
                    Isvalid = true,
                    Postcode = "",
                    Profession = (int)Profession.ShuXueYuWuLi,
                    UserName = "bianweihuiB@163.com"
                }.PostAdd();

                new T_Expert()
                {
                    Address = "地址",
                    Country = "",
                    Degree = "博士",
                    Fax = "",
                    Institution = "单位",
                    Introduction = "简介",
                    Isvalid = true,
                    Postcode = "",
                    Profession = (int)Profession.ShuXueYuWuLi,
                    UserName = "zhuanjia@163.com"
                }.PostAdd();

                new T_Expert()
                {
                    Address = "地址",
                    Country = "",
                    Degree = "博士",
                    Fax = "",
                    Institution = "单位",
                    Introduction = "简介",
                    Isvalid = true,
                    Postcode = "",
                    Profession = (int)Profession.ShuXueYuWuLi,
                    UserName = "634691728@qq.com"
                }.PostAdd();

                new News()
                {
                    Content = "<p style=\"TEXT-INDENT: 2em\"><strong>天气预报：</strong></p><p style=\"TEXT-INDENT: 2em\">12日夜间到13日白天，东南部阵雨或雷雨转多云，其余地区多云间晴，12℃~26℃。主城区：多云，15℃~24℃。</p><p style=\"TEXT-INDENT: 2em\">13日夜间到14日白天，多云间阴天，东南部及偏南局部地区有阵雨或雷雨，10℃~25℃。主城区：多云间阴天，15℃~24℃。</p>",
                    CreateDate = DateTime.Now,
                    DisplayEditor = "责任编辑",
                    Editor = "admin@163.com",
                    Form = "大渝网",
                    Title = "强对流天气频繁 雷电冰雹近期或再现"
                }.PostAdd();
                new News()
                {
                    Content = "<p style=\"TEXT-INDENT: 2em\"><strong>天气预报：</strong></p><p style=\"TEXT-INDENT: 2em\">12日夜间到13日白天，东南部阵雨或雷雨转多云，其余地区多云间晴，12℃~26℃。主城区：多云，15℃~24℃。</p><p style=\"TEXT-INDENT: 2em\">13日夜间到14日白天，多云间阴天，东南部及偏南局部地区有阵雨或雷雨，10℃~25℃。主城区：多云间阴天，15℃~24℃。</p>",
                    CreateDate = DateTime.Now,
                    DisplayEditor = "责任编辑",
                    Editor = "admin@163.com",
                    Form = "大渝网",
                    Title = "强对流天气频繁 雷电冰雹近期或再现"
                }.PostAdd();
                new News()
                {
                    Content = "<p style=\"TEXT-INDENT: 2em\"><strong>天气预报：</strong></p><p style=\"TEXT-INDENT: 2em\">12日夜间到13日白天，东南部阵雨或雷雨转多云，其余地区多云间晴，12℃~26℃。主城区：多云，15℃~24℃。</p><p style=\"TEXT-INDENT: 2em\">13日夜间到14日白天，多云间阴天，东南部及偏南局部地区有阵雨或雷雨，10℃~25℃。主城区：多云间阴天，15℃~24℃。</p>",
                    CreateDate = DateTime.Now,
                    DisplayEditor = "责任编辑",
                    Editor = "admin@163.com",
                    Form = "大渝网",
                    Title = "强对流天气频繁 雷电冰雹近期或再现"
                }.PostAdd();
                new News()
                {
                    Content = "<p style=\"TEXT-INDENT: 2em\"><strong>天气预报：</strong></p><p style=\"TEXT-INDENT: 2em\">12日夜间到13日白天，东南部阵雨或雷雨转多云，其余地区多云间晴，12℃~26℃。主城区：多云，15℃~24℃。</p><p style=\"TEXT-INDENT: 2em\">13日夜间到14日白天，多云间阴天，东南部及偏南局部地区有阵雨或雷雨，10℃~25℃。主城区：多云间阴天，15℃~24℃。</p>",
                    CreateDate = DateTime.Now,
                    DisplayEditor = "责任编辑",
                    Editor = "admin@163.com",
                    Form = "大渝网",
                    Title = "强对流天气频繁 雷电冰雹近期或再现"
                }.PostAdd();
                new News()
                {
                    Content = "<p style=\"TEXT-INDENT: 2em\"><strong>天气预报：</strong></p><p style=\"TEXT-INDENT: 2em\">12日夜间到13日白天，东南部阵雨或雷雨转多云，其余地区多云间晴，12℃~26℃。主城区：多云，15℃~24℃。</p><p style=\"TEXT-INDENT: 2em\">13日夜间到14日白天，多云间阴天，东南部及偏南局部地区有阵雨或雷雨，10℃~25℃。主城区：多云间阴天，15℃~24℃。</p>",
                    CreateDate = DateTime.Now,
                    DisplayEditor = "责任编辑",
                    Editor = "admin@163.com",
                    Form = "大渝网",
                    Title = "强对流天气频繁 雷电冰雹近期或再现"
                }.PostAdd();
                Console.Write("好老");
            }
            catch (Exception e)
            {
                Console.Write(e.ToString());
            }
            Console.ReadKey();
        }
    }
}
